﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AbyssCombatLogger
{

    [Serializable]
    public class Enemy
    {
        protected static System.UInt32 enemyCount = 0;
        public Enemy(string enemyName)
        {
            this.name = enemyName;
        }
        public Enemy(bool loadFromExisting, TreeNode oneAssociatedNode)
        {
            enemyCount++;
            //for now give it an enemy id
            enemyID = enemyCount;
            if (oneAssociatedNode != null)
                oneAssociatedNode.Tag = this; //do helper task
        }
        private System.UInt32 enemyID = 0;

        protected System.UInt32 EnemyID
        {
            get { return enemyID; }
            set { enemyID = value; }
        }
        private string name = null;
        public string Name
        {
            get { return name; }
            set
            {
                string trimmed = value.Trim();
                if (trimmed != null && trimmed != "") //right now provides no guarantee of uniqueness, but i will add a static list of all the Targets and thier names
                    name = trimmed;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }
}
